<template>
  <div class="param-info">
    <table
      v-for="table in goodsParam.sizes"
      :key="table.title"
      class="info-size"
    >
      <tr v-for="tr in table" :key="tr.title">
        <td v-for="td in tr" :key="td.title">{{ td }}</td>
      </tr>
    </table>

    <table class="info-param">
      <tr v-for="item in goodsParam.infos" :key="item.title">
        <td class="info-param-key">{{ item.key }}</td>
        <td class="info-value">{{ item.value }}</td>
      </tr>
    </table>
    <div class="info-img">
      <img :src="goodsParam.image" alt="" />
    </div>
  </div>
</template>

<script>
export default {
  name: "DetailParamInfo",
  props: {
    goodsParam: {
      type: Object,
      default() {
        return {};
      },
    },
  },
};
</script>

<style scoped>
.param-info {
  padding: 20px 15px;
  font-size: 14px;
  border-bottom: 5px solid #f2f5f8;
}
.info-size {
  width: 100%;
  border-collapse: collapse;
}
.info-size tr {
  height: 42px;
}
.info-size tr td {
  border-bottom: 1px solid rgba(100, 100, 100, 0.1);
}
.info-param-key {
  width: 100px;
}
.info-param {
  border-top: 1px solid rgba(0, 0, 0, 0.1);
}
.info-param tr {
  height: 42px;
}
.info-param tr td {
  border-bottom: 1px solid rgba(100, 100, 100, 0.1);
}
.info-param .info-value {
  color: #eb4868;
}
.info-img img {
  width: 100%;
}
</style>